Skip to content
  • set hostname using static IP

    General Discussion mysensors hostname static
    3
    0 Votes
    3 Posts
    42 Views
    TheoLT
    I did a grep on the source code and found this snipper #if defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32) // Turn off access point WiFi.mode(WIFI_STA); #if defined(MY_GATEWAY_ESP8266) WiFi.hostname(MY_HOSTNAME); #elif defined(MY_GATEWAY_ESP32) WiFi.setHostname(MY_HOSTNAME); #endif #if defined(MY_IP_ADDRESS) WiFi.config(_MQTT_clientIp, _gatewayIp, _subnetIp); #endif /* End of MY_IP_ADDRESS */ (void)WiFi.begin(MY_WIFI_SSID, MY_WIFI_PASSWORD, 0, MY_WIFI_BSSID); #endif MySensors uses the standard ESP libraries for this. So I expect it to work. But you need to provide at least a bit of source code. Right now it's hard to answer your question. Regarding to MySensors: A HTTP hostname can only be set for Gateways that either use Wifi or Ethernet For nodes you can provide a sketchname and that will be seen in your controller. Regarding to static non static IP addresses. I prefer to use DHCP and set that device in my router as a static IP. There I also give it another hostname. So that in case I have to replace my Gateway I can do it all in the router. Hope this helps. But please provide more info on what you're trying to achieve

23

Online

11.7k

Users

11.2k

Topics

113.1k

Posts